package com.java.androidmarket.dao;

import com.java.androidmarket.entity.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description:
 * author:张腾
 * date:2021-05-08
 */

@Mapper
public interface AddressDao {

    List<Address> getAddress(int userId);

    Address getDefaultAdd(int userId);

    void newAdd(Address address);

    void updateAdd(Address address);

    void deleteAdd(int addressId);

    int getUserId(int addressId);

    void updateState(@Param("addressId") int addressId, @Param("state") int state);
}
